﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="list_type.aspx.cs" Inherits="Eis51.Web.Admin.DownLoadFileMgnt.list_type" %>

<%@ Register TagPrefix="cc1" Namespace="COM.ZTE.TPG.App.UI.WebForm" Assembly="COM.ZTE.TPG.App.UI.WebForm" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>ProductsList</title>
    <link href="../../css/cssCn1.css" type="text/css" rel="stylesheet">
    <link href="../../css/cssCn.css" type="text/css" rel="stylesheet">

    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script type="text/javascript">

        function SelectAll(strGridId) {

            var objCK = document.getElementsByTagName("input");
            var loop;
            var index = 0;
            var objArray = new Array();

            for (loop = 1; loop < objCK.length; loop++) {
                if (objCK[loop].type == "checkbox") {
                    if (objCK[loop].id.indexOf(strGridId) != -1) {
                        objArray[index] = objCK[loop];
                        index++;
                    }
                }
            }
            for (loop = 1; loop < objArray.length; loop++) {
                if (!objArray[loop].disabled) {
                    objArray[loop].click();
                    objArray[loop].checked = objArray[0].checked;
                }
            }
        }
        function CheckSelected(strGridId, isdel) {
            var taskIds;
            var check = false;
            var objCK = document.getElementsByTagName("input");
            var loop;
            var index = 0;
            var objArray = new Array();
            for (loop = 1; loop < objCK.length; loop++) {
                if (objCK[loop].type == "checkbox") {
                    if (objCK[loop].id.indexOf(strGridId) != -1) {
                        objArray[index] = objCK[loop];
                        index++;
                    }
                }
            }

            for (loop = 1; loop < objArray.length; loop++) {
                if (objArray[loop].checked) {

                    check = true;
                }
            }



            if (!check) {
                alert('请至少选择一个新闻进行操作！');
                return false;
            }
            if (isdel == 1) {
                return confirm("确认要删除你所选择的数据吗？");
            }


        }
    
    
    </script>

</head>
<body ms_positioning="GridLayout">
    <form id="Form1" method="post" runat="server">
    <table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tr>
            <td>
                <div class="div_subtitle">
                    当前位置：首页图片位置<span class="arrow_subtitle">&gt;</span>位置模块</div>
            </td>
        </tr>
    </table>
    <table id="tb_content" cellspacing="0" cellpadding="0" align="center">
        <tbody>
            <tr>
                <td>
                    <table class="tb_searchbar" cellspacing="1" width="100%">
                        <tbody>
                            <tr>
                                <td align="right" colspan="4">
                                    <asp:Button ID="btnSearch" runat="server" Text="查询" CssClass="Button" OnClick="btnSearch_Click">
                                    </asp:Button><asp:Button ID="btnAdd" runat="server" Text="新增" CssClass="Button" OnClick="btnAdd_Click">
                                    </asp:Button>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <cc1:ZteGrid ID="dgNews" runat="server" CssClass="tb_datalist" PageChange="TextBox"
                        Width="100%" AllowPaging="True" PageLanguage="Chinese" IsAllowPaging="True" BorderWidth="0px"
                        CellSpacing="1" AutoGenerateColumns="False" CacheData="ServerCach" SortMode="Total"
                        PageCSS="scrollButton" BorderStyle="Solid" OnItemCommand="dgNews_ItemCommand"
                        OnItemDataBound="dgNews_ItemDataBound">
                        <AlternatingItemStyle CssClass="tr_even" BackColor="#F7F9FE"></AlternatingItemStyle>
                        <FooterStyle BackColor="#E8E8E8"></FooterStyle>
                        <ItemStyle BorderColor="White" BackColor="White"></ItemStyle>
                        <Columns>
                            <asp:BoundColumn Visible="False" DataField="DownLoadFileTypeID" HeaderText="DownLoadFileTypeID"></asp:BoundColumn>
                            <asp:TemplateColumn Visible="false">
                                <HeaderStyle Width="30px" />
                                <HeaderTemplate>
                                    <asp:CheckBox ID="cbxAll" runat="server" ToolTip="全选/全否选" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbItem" runat="server" /><asp:HiddenField ID="txtSeqno" Value='<%# DataBinder.Eval(Container.DataItem, "DownLoadFileTypeID") %>'
                                        runat="server" />
                                </ItemTemplate>
                            </asp:TemplateColumn>
                             <asp:TemplateColumn>
                                <HeaderTemplate>
                                    位置模块
                                </HeaderTemplate>
                                <ItemTemplate>
                                     <asp:Label id="lblClassType" runat="server" Text='<%#GetTitle(DataBinder.Eval(Container.DataItem, "TypeName"))%>'></asp:Label>                                   
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:BoundColumn DataField="CreateBy" HeaderText="发布人"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Desc" HeaderText="位置"></asp:BoundColumn>
                            <asp:BoundColumn DataField="CreateDate" HeaderText="发布时间"></asp:BoundColumn>                            
                            <asp:TemplateColumn>
                                <HeaderTemplate>
                                    操作
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnModify" runat="server" CommandName="Modify" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "DownLoadFileTypeID") %>'>修改</asp:LinkButton>
                                    &nbsp;
                                    <asp:LinkButton
                                        ID="btnDelete" runat="server" CommandName="Delete" OnClientClick="return confirm('确定要删除该类型吗?');" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "DownLoadFileTypeID") %>'>删除</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                        </Columns>
                        <HeaderStyle CssClass="tr_title" BackColor="LightGray"></HeaderStyle>
                        <SelectedItemStyle CssClass="tr_selected" BackColor="#D8D8D8"></SelectedItemStyle>
                        <PagerStyle CssClass="tr_pagenumber"></PagerStyle>
                    </cc1:ZteGrid>
                </td>
            </tr>
        </tbody>
    </table>
     
    </form>
</body>
</html>
